package com.lovo.csc.service.impl;

import com.lovo.csc.entity.Register;
import com.lovo.csc.mapper.RegisterMapper;
import com.lovo.csc.service.IRegisterService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lovo.dto.RegisterDto;
import com.lovo.util.MQUtil;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Service;

import java.io.IOException;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lovo
 * @since 2022-07-07
 */

@Service
public class RegisterServiceImpl extends ServiceImpl<RegisterMapper, Register> implements IRegisterService {
    @Autowired
    IRegisterService service;
//    @RabbitListener(queues = MQUtil.maintainQueue)
//    public void order( RegisterDto dto) throws InterruptedException, IOException {
//        if(null!=dto) {
//            Register order = new Register();
//            order.setRName( dto.getUserName());
//            order.setRPwd(dto.getUserPwd());
//            order.setRPhone(dto.getUserPhone());
//            order.setRRealname(dto.getRealName());
//            order.setRGender(dto.getUserSex());
//            order.setRZiimg(dto.getUserQualification());
//            order.setRShimg(dto.getUserCard());
//            order.setRCompany(dto.getUserPompany());
//            order.setRGrade("LV0");
//            service.save(order);
//        }
//    }
}
